package lab02.test11;

/**
 * Created by dell on 2017/10/19.
 */
public class Square extends Rectangle {
    //属性：对角线
    double diagonal;
    //方法：求对角线
    double diagonal(){
        return (sidea+sideb)/2;
    }
//边长、面积、周长和对角线长
    @Override
    public String printMyWay() {
        return sidea+"/"+sideb+"/"+perimeter+"/"+diagonal;
    }
}

